import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = { auth: true }

export default {
    path: '/profitAllocation',
    name: 'profitAllocation',
    meta,
    redirect: { name: 'profitAllocation' },
    component: layoutHeaderAside,
    children: (pre => [
        {
            path: 'rule',
            name: `${pre}rule`,
            component: _import('profitAllocation/profitAllocationRule'),
            meta: {
                ...meta,
                title: '分账规则管理'
            }
        },
		{
		    path: 'merchant',
		    name: `${pre}merchant`,
		    component: _import('profitAllocation/merchantAccount'),
		    meta: {
		        ...meta,
		        title: '分账商户管理'
		    }
		},
		{
		    path: 'order',
		    name: `${pre}order`,
		    component: _import('profitAllocation/profitAllocationOrder'),
		    meta: {
		        ...meta,
		        title: '分账订单管理'
		    }
		},
		// {
		//     path: 'paymentLog',
		//     name: `${pre}paymentLog`,
		//     component: _import('profitAllocation/paymentLog'),
		//     meta: {
		//         ...meta,
		//         title: '支付日志'
		//     }
		// },
    ])('profitAllocation-')
}
